package com.heima.model.user.dtos;

import com.heima.model.common.annotation.IdEncrypt;
import io.swagger.models.auth.In;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

@Data
public class UserRelationDto {
    /**
     * 文章id
     */
    @IdEncrypt
    private Long articleId;
    /**
     * 作者id
     */
    @IdEncrypt
    private Integer authorId;
    /**
     * 操作类型 0：关注 1：取消关注
     */
    private short operation;

    public boolean checkParam() {
        if (articleId == null || authorId == null || this.operation < 0 || this.operation > 1) {
            return true;
        } else return false;
    }
}
